package  
{
	import org.flixel.FlxButton;
	import org.flixel.FlxPoint;
	import org.flixel.FlxState;
	import org.flixel.FlxSprite;
	import org.flixel.FlxText;
	import org.flixel.FlxG;
	import org.flixel.FlxU;
	/**
	 * ...
	 * @author Lucas Mattos
	 */
	public class FirstScreen extends FlxState
	{
		[Embed(source = "../assets/telas/back.png")]
		public var background:Class;
		public var backgroundSprite:FlxSprite;
		
		public var beginButton:FlxButton;
		public var text:FlxText;
		
		public function FirstScreen() 
		{
			super();
			
			backgroundSprite = new FlxSprite(0, 0, background);
			add(backgroundSprite);
		}
		
		public override function create():void
		{
			text = new FlxText(30, 30, 740, "Congratulations! You got elected as Mayor of your city!");
			text.setFormat(null, 20, 0xffffff,"center", 0);
			add(text);
			
			text = new FlxText(30, text.y+text.height+10, 740, "But this is just the first step of your way to the presidence!\n\n\n\nAll right, you have some influence now, but this is nothing compared to what you can do after some 'upgrades'... you know, politics can be fun, all the money you can get, all the laws you can break! Ehhr, I mean.. make.");
			text.setFormat(null, 13, 0xffffff,"center", 0);
			add(text);
			
			text = new FlxText(30, text.y+text.height+40, 740, "All right, lets get started, but before I'll give you some tips. Money money money always! Damn whippersnappers deserve to pay for such a striking piece of man in their representation! Duh, thats obvious.. but, pay atention:\n\n First: some federals think they are honest, and if they see you doing something wrong, they can try to get you, but don't worry too much, they will not run after you for a long time.. these guys are too lazy, haha!\n\n Second: don't forget the press. Those parasites! Always being a pain in the ass... asking the right questions and taking some right shots, they will certainly low your popularity, and this will consequently diminish your influence, and then your money steal.. rhhmmm, getting by will be much slower, try avoiding them as much as you can.\n\n\nNow, get your ass moving and do something! Let's see how much you can do in your first mandate as mayor!");
			text.setFormat(null, 13, 0xffffff,"center", 0);
			add(text);
			
			beginButton = new FlxButton(60, 560, "Begin!", beginGame);
			beginButton.x = Main.windowWidth / 2 - beginButton.width / 2;
			beginButton.changeButtonSize(2, 2);
			beginButton.color = 0xd5ce91;
			add(beginButton);
		}
		
		private function beginGame():void
		{		
			FlxG.switchState(new MainState());
		}
		
	}

}